import request from '@/utils/request'

// 新增等级
export function addGrade(data) {
  return request({
    url: '/grade/info',
    method: 'post',
    data: data
  })
}

// 更新等级
export function upGrade(data) {
  return request({
    url: '/grade/info',
    method: 'put',
    data: data
  })
}

// 查询等级列表
export function getGrade(query) {
  return request({
    url: '/grade/info/list',
    method: 'get',
    params: query
  })
}

// 删除等级
export function delGrade(data) {
  return request({
    url: '/grade/info/deleteGrade',
    method: 'post',
    data: data
  })
}
// 设置会员等级
export function setGrade(query) {
  return request({
    url: '/enterprise/growUpValueSetting/query',
    method: 'get',
    params: query
  })
}
// 保存会员等级
export function saveGradeLevel(data) {
  return request({
    url: '/enterprise/growUpValueSetting/save',
    method: 'post',
    data
  })
}
// 查询二维码
export function getGradeQr(query) {
  return request({
    url: '/gradeQrSetting/query',
    method: 'get',
    params: query
  })
}
// 保存刷新二维码
export function saveGrade(data) {
  return request({
    url: '/gradeQrSetting/save',
    method: 'post',
    data: data
  })
}
